Optimal. Leaf size=373 \[ -\frac {3 a b e m n x}{2 f}+\frac {7 b^2 e m n^2 x}{4 f}-\frac {3}{8} b^2 m n^2 x^2-\frac {3 b^2 e m n x \log \left (c x^n\right )}{2 f}+\frac {1}{2} b m n x^2 \left (a+b \log \left (c x^n\right )\right )+\frac {e m x \left (a+b \log \left (c x^n\right )\right )^2}{2 f}-\frac {1}{4} m x^2 \left (a+b \log \left (c x^n\right )\right )^2-\frac {b^2 e^2 m n^2 \log (e+f x)}{4 f^2}+\frac {1}{4} b^2 n^2 x^2 \log \left (d (e+f x)^m\right )-\frac {1}{2} b n x^2 \left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right )+\frac {1}{2} x^2 \left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right )+\frac {b e^2 m n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac {f x}{e}\right )}{2 f^2}-\frac {e^2 m \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\frac {f x}{e}\right )}{2 f^2}+\frac {b^2 e^2 m n^2 \text {Li}_2\left (-\frac {f x}{e}\right )}{2 f^2}-\frac {b e^2 m n \left (a+b \log \left (c x^n\right )\right ) \text {Li}_2\left (-\frac {f x}{e}\right )}{f^2}+\frac {b^2 e^2 m n^2 \text {Li}_3\left (-\frac {f x}{e}\right )}{f^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.35, antiderivative size = 373, normalized size of antiderivative = 1.00, number of steps
used = 21, number of rules used = 12, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {2342, 2341,
2425, 45, 2393, 2332, 2354, 2438, 2395, 2333, 2421, 6724} \begin {gather*} -\frac {b e^2 m n \text {PolyLog}\left (2,-\frac {f x}{e}\right ) \left (a+b \log \left (c x^n\right )\right )}{f^2}+\frac {b^2 e^2 m n^2 \text {PolyLog}\left (2,-\frac {f x}{e}\right )}{2 f^2}+\frac {b^2 e^2 m n^2 \text {PolyLog}\left (3,-\frac {f x}{e}\right )}{f^2}-\frac {1}{2} b n x^2 \left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right )+\frac {1}{2} x^2 \left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right )+\frac {b e^2 m n \log \left (\frac {f x}{e}+1\right ) \left (a+b \log \left (c x^n\right )\right )}{2 f^2}-\frac {e^2 m \log \left (\frac {f x}{e}+1\right ) \left (a+b \log \left (c x^n\right )\right )^2}{2 f^2}+\frac {e m x \left (a+b \log \left (c x^n\right )\right )^2}{2 f}+\frac {1}{2} b m n x^2 \left (a+b \log \left (c x^n\right )\right )-\frac {1}{4} m x^2 \left (a+b \log \left (c x^n\right )\right )^2-\frac {3 a b e m n x}{2 f}-\frac {3 b^2 e m n x \log \left (c x^n\right )}{2 f}+\frac {1}{4} b^2 n^2 x^2 \log \left (d (e+f x)^m\right )-\frac {b^2 e^2 m n^2 \log (e+f x)}{4 f^2}+\frac {7 b^2 e m n^2 x}{4 f}-\frac {3}{8} b^2 m n^2 x^2 \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 45
Rule 2332
Rule 2333
Rule 2341
Rule 2342
Rule 2354
Rule 2393
Rule 2395
Rule 2421
Rule 2425
Rule 2438
Rule 6724
Rubi steps
\begin {align*} \int x \left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right ) \, dx &=\frac {1}{4} b^2 n^2 x^2 \log \left (d (e+f x)^m\right )-\frac {1}{2} b n x^2 \left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right )+\frac {1}{2} x^2 \left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right )-(f m) \int \left (\frac {b^2 n^2 x^2}{4 (e+f x)}-\frac {b n x^2 \left (a+b \log \left (c x^n\right )\right )}{2 (e+f x)}+\frac {x^2 \left (a+b \log \left (c x^n\right )\right )^2}{2 (e+f x)}\right ) \, dx\\ &=\frac {1}{4} b^2 n^2 x^2 \log \left (d (e+f x)^m\right )-\frac {1}{2} b n x^2 \left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right )+\frac {1}{2} x^2 \left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right )-\frac {1}{2} (f m) \int \frac {x^2 \left (a+b \log \left (c x^n\right )\right )^2}{e+f x} \, dx+\frac {1}{2} (b f m n) \int \frac {x^2 \left (a+b \log \left (c x^n\right )\right )}{e+f x} \, dx-\frac {1}{4} \left (b^2 f m n^2\right ) \int \frac {x^2}{e+f x} \, dx\\ &=\frac {1}{4} b^2 n^2 x^2 \log \left (d (e+f x)^m\right )-\frac {1}{2} b n x^2 \left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right )+\frac {1}{2} x^2 \left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right )-\frac {1}{2} (f m) \int \left (-\frac {e \left (a+b \log \left (c x^n\right )\right )^2}{f^2}+\frac {x \left (a+b \log \left (c x^n\right )\right )^2}{f}+\frac {e^2 \left (a+b \log \left (c x^n\right )\right )^2}{f^2 (e+f x)}\right ) \, dx+\frac {1}{2} (b f m n) \int \left (-\frac {e \left (a+b \log \left (c x^n\right )\right )}{f^2}+\frac {x \left (a+b \log \left (c x^n\right )\right )}{f}+\frac {e^2 \left (a+b \log \left (c x^n\right )\right )}{f^2 (e+f x)}\right ) \, dx-\frac {1}{4} \left (b^2 f m n^2\right ) \int \left (-\frac {e}{f^2}+\frac {x}{f}+\frac {e^2}{f^2 (e+f x)}\right ) \, dx\\ &=\frac {b^2 e m n^2 x}{4 f}-\frac {1}{8} b^2 m n^2 x^2-\frac {b^2 e^2 m n^2 \log (e+f x)}{4 f^2}+\frac {1}{4} b^2 n^2 x^2 \log \left (d (e+f x)^m\right )-\frac {1}{2} b n x^2 \left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right )+\frac {1}{2} x^2 \left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right )-\frac {1}{2} m \int x \left (a+b \log \left (c x^n\right )\right )^2 \, dx+\frac {(e m) \int \left (a+b \log \left (c x^n\right )\right )^2 \, dx}{2 f}-\frac {\left (e^2 m\right ) \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{e+f x} \, dx}{2 f}+\frac {1}{2} (b m n) \int x \left (a+b \log \left (c x^n\right )\right ) \, dx-\frac {(b e m n) \int \left (a+b \log \left (c x^n\right )\right ) \, dx}{2 f}+\frac {\left (b e^2 m n\right ) \int \frac {a+b \log \left (c x^n\right )}{e+f x} \, dx}{2 f}\\ &=-\frac {a b e m n x}{2 f}+\frac {b^2 e m n^2 x}{4 f}-\frac {1}{4} b^2 m n^2 x^2+\frac {1}{4} b m n x^2 \left (a+b \log \left (c x^n\right )\right )+\frac {e m x \left (a+b \log \left (c x^n\right )\right )^2}{2 f}-\frac {1}{4} m x^2 \left (a+b \log \left (c x^n\right )\right )^2-\frac {b^2 e^2 m n^2 \log (e+f x)}{4 f^2}+\frac {1}{4} b^2 n^2 x^2 \log \left (d (e+f x)^m\right )-\frac {1}{2} b n x^2 \left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right )+\frac {1}{2} x^2 \left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right )+\frac {b e^2 m n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac {f x}{e}\right )}{2 f^2}-\frac {e^2 m \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\frac {f x}{e}\right )}{2 f^2}+\frac {1}{2} (b m n) \int x \left (a+b \log \left (c x^n\right )\right ) \, dx+\frac {\left (b e^2 m n\right ) \int \frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac {f x}{e}\right )}{x} \, dx}{f^2}-\frac {(b e m n) \int \left (a+b \log \left (c x^n\right )\right ) \, dx}{f}-\frac {\left (b^2 e m n\right ) \int \log \left (c x^n\right ) \, dx}{2 f}-\frac {\left (b^2 e^2 m n^2\right ) \int \frac {\log \left (1+\frac {f x}{e}\right )}{x} \, dx}{2 f^2}\\ &=-\frac {3 a b e m n x}{2 f}+\frac {3 b^2 e m n^2 x}{4 f}-\frac {3}{8} b^2 m n^2 x^2-\frac {b^2 e m n x \log \left (c x^n\right )}{2 f}+\frac {1}{2} b m n x^2 \left (a+b \log \left (c x^n\right )\right )+\frac {e m x \left (a+b \log \left (c x^n\right )\right )^2}{2 f}-\frac {1}{4} m x^2 \left (a+b \log \left (c x^n\right )\right )^2-\frac {b^2 e^2 m n^2 \log (e+f x)}{4 f^2}+\frac {1}{4} b^2 n^2 x^2 \log \left (d (e+f x)^m\right )-\frac {1}{2} b n x^2 \left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right )+\frac {1}{2} x^2 \left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right )+\frac {b e^2 m n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac {f x}{e}\right )}{2 f^2}-\frac {e^2 m \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\frac {f x}{e}\right )}{2 f^2}+\frac {b^2 e^2 m n^2 \text {Li}_2\left (-\frac {f x}{e}\right )}{2 f^2}-\frac {b e^2 m n \left (a+b \log \left (c x^n\right )\right ) \text {Li}_2\left (-\frac {f x}{e}\right )}{f^2}-\frac {\left (b^2 e m n\right ) \int \log \left (c x^n\right ) \, dx}{f}+\frac {\left (b^2 e^2 m n^2\right ) \int \frac {\text {Li}_2\left (-\frac {f x}{e}\right )}{x} \, dx}{f^2}\\ &=-\frac {3 a b e m n x}{2 f}+\frac {7 b^2 e m n^2 x}{4 f}-\frac {3}{8} b^2 m n^2 x^2-\frac {3 b^2 e m n x \log \left (c x^n\right )}{2 f}+\frac {1}{2} b m n x^2 \left (a+b \log \left (c x^n\right )\right )+\frac {e m x \left (a+b \log \left (c x^n\right )\right )^2}{2 f}-\frac {1}{4} m x^2 \left (a+b \log \left (c x^n\right )\right )^2-\frac {b^2 e^2 m n^2 \log (e+f x)}{4 f^2}+\frac {1}{4} b^2 n^2 x^2 \log \left (d (e+f x)^m\right )-\frac {1}{2} b n x^2 \left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right )+\frac {1}{2} x^2 \left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right )+\frac {b e^2 m n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac {f x}{e}\right )}{2 f^2}-\frac {e^2 m \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\frac {f x}{e}\right )}{2 f^2}+\frac {b^2 e^2 m n^2 \text {Li}_2\left (-\frac {f x}{e}\right )}{2 f^2}-\frac {b e^2 m n \left (a+b \log \left (c x^n\right )\right ) \text {Li}_2\left (-\frac {f x}{e}\right )}{f^2}+\frac {b^2 e^2 m n^2 \text {Li}_3\left (-\frac {f x}{e}\right )}{f^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.16, size = 674, normalized size = 1.81 \begin {gather*} \frac {4 a^2 e f m x-12 a b e f m n x+14 b^2 e f m n^2 x-2 a^2 f^2 m x^2+4 a b f^2 m n x^2-3 b^2 f^2 m n^2 x^2+8 a b e f m x \log \left (c x^n\right )-12 b^2 e f m n x \log \left (c x^n\right )-4 a b f^2 m x^2 \log \left (c x^n\right )+4 b^2 f^2 m n x^2 \log \left (c x^n\right )+4 b^2 e f m x \log ^2\left (c x^n\right )-2 b^2 f^2 m x^2 \log ^2\left (c x^n\right )-4 a^2 e^2 m \log (e+f x)+4 a b e^2 m n \log (e+f x)-2 b^2 e^2 m n^2 \log (e+f x)+8 a b e^2 m n \log (x) \log (e+f x)-4 b^2 e^2 m n^2 \log (x) \log (e+f x)-4 b^2 e^2 m n^2 \log ^2(x) \log (e+f x)-8 a b e^2 m \log \left (c x^n\right ) \log (e+f x)+4 b^2 e^2 m n \log \left (c x^n\right ) \log (e+f x)+8 b^2 e^2 m n \log (x) \log \left (c x^n\right ) \log (e+f x)-4 b^2 e^2 m \log ^2\left (c x^n\right ) \log (e+f x)+4 a^2 f^2 x^2 \log \left (d (e+f x)^m\right )-4 a b f^2 n x^2 \log \left (d (e+f x)^m\right )+2 b^2 f^2 n^2 x^2 \log \left (d (e+f x)^m\right )+8 a b f^2 x^2 \log \left (c x^n\right ) \log \left (d (e+f x)^m\right )-4 b^2 f^2 n x^2 \log \left (c x^n\right ) \log \left (d (e+f x)^m\right )+4 b^2 f^2 x^2 \log ^2\left (c x^n\right ) \log \left (d (e+f x)^m\right )-8 a b e^2 m n \log (x) \log \left (1+\frac {f x}{e}\right )+4 b^2 e^2 m n^2 \log (x) \log \left (1+\frac {f x}{e}\right )+4 b^2 e^2 m n^2 \log ^2(x) \log \left (1+\frac {f x}{e}\right )-8 b^2 e^2 m n \log (x) \log \left (c x^n\right ) \log \left (1+\frac {f x}{e}\right )+4 b e^2 m n \left (-2 a+b n-2 b \log \left (c x^n\right )\right ) \text {Li}_2\left (-\frac {f x}{e}\right )+8 b^2 e^2 m n^2 \text {Li}_3\left (-\frac {f x}{e}\right )}{8 f^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 0.54, size = 11828, normalized size = 31.71
method | result | size |
risch | \(\text {Expression too large to display}\) | \(11828\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int x\,\ln \left (d\,{\left (e+f\,x\right )}^m\right )\,{\left (a+b\,\ln \left (c\,x^n\right )\right )}^2 \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________